package com.machuxin.course.patterns.proxy.jdklib.impl;

import com.machuxin.course.patterns.proxy.jdklib.BuyHouse;
import com.machuxin.course.patterns.proxy.jdklib.BuyHouseImpl;
import com.machuxin.course.patterns.proxy.jdklib.DynamicProxyHandler;
import sun.misc.ProxyGenerator;

import java.io.FileOutputStream;

public class Test {

    public static void main(String[] args) {
        DynamicProxyHandler2 dynamicProxyHandler = new DynamicProxyHandler2();
        BuyHouse proxyBuyHouse = (BuyHouse) dynamicProxyHandler.getInstance(new BuyHouseImpl());
        proxyBuyHouse.buyHouse();

    }
}
